{extend name="index/base" /}
{block name="main"}
    <div class="layui-tab">
        <ul class="layui-tab-title">
            {volist name="type" id="group" }
                <li {eq name="id" value="$key"} class="layui-this" {/eq} ><a href="{:url('sys',array('id'=>$key))}">{$group}设置</a> </li>
            {/volist}
        </ul>

    </div>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 15px;">
        <legend>设置</legend>
    </fieldset>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body" pad15>
                        <form action="{:url('save')}" method="post">
                            <div class="layui-form" wid100 lay-filter="">
                                {volist name="list" id="config"}
                                    <div class="layui-form-item">
                                        <label class="layui-form-label" style="width: 190px">{$config.title}</label>
                                        <div class="layui-input-block" style="margin-left: 240px;">
                                            {switch name="config.type"}
                                                {case 0}
                                                    <input  type="text" name="config[{$config.name}]" value="{$config.value}" class="layui-input">
                                                {/case}
                                                {case 1}
                                                    <input type="text" name="config[{$config.name}]" value="{$config.value}" class="layui-input">
                                                {/case}
                                                {case 2}
                                                    <textarea name="config[{$config.name}]" class="layui-textarea">{$config.value}</textarea>
                                                {/case}
                                                {case 3}
                                                    <textarea name="config[{$config.name}]" class="layui-textarea">{$config.value}</textarea>
                                                {/case}
                                                {case 4}
                                                    <select name="config[{$config.name}]">
                                                        {volist name="$config['extra']|parse_config_attr" id="vo"}
                                                            <option value="{$key}" {eq name="config.value" value="$key"}selected{/eq}>{$vo}</option>
                                                        {/volist}
                                                    </select>
                                                {/case}
                                            {/switch}
                                        </div>
                                    </div>
                                {/volist}
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button type="submit" class="layui-btn" lay-submit lay-filter="set_website">确认保存</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {load href="__PUBLIC__/js/jquery-1.10.2.min.js"/}
    <script>
        //Demo
        layui.use('form', function(){
            var form = layui.form;

        });
    </script>
{/block}
